﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace LyyCMS.Core.Models
{
    [Table("Users")]
    public class User
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [MinLength(4,ErrorMessage ="不能少于4个字符")]
        [DisplayName("用户名")]
        public virtual string UserName { get; set; }

        [Required]
        [MinLength(6,ErrorMessage ="密码长度不能低于6位")]
        [DisplayName("密码")]
        public virtual string UserPass { get; set; }

        [EmailAddress]
        [DisplayName("Email")]
        public virtual string Email { get; set; }

        [DisplayName("QQ")]
        public virtual string QQ { get; set; }

        [DisplayName("用户类型")]
        public virtual UserType UserType { get; set; }

        [DisplayName("用户状态")]
        public virtual UserState UserState { get; set; }

        [DisplayName("创建时间")]
        public virtual DateTime? Crete_At { get; set; }
    }
}
